Electronic systems and circuits have made a significant contribution towards the advancement of modern society and are utilized in a number of applications to achieve advantageous results. Numerous electronic technologies such as digital computers, calculators, audio devices, video equipment, and telephone systems facilitate increased productivity and cost reduction in analyzing and communicating data, ideas and trends in most areas of business, science, education and entertainment. Electronic systems designed to produce these results usually involve interfacing with a user and the interfacing often involves presentation of graphical images to the user. Displaying graphics images traditionally involves intensive data processing and coordination requiring considerable resources and providing clear and concise images is often problematic.
An image is typically represented as a raster (an array) of logical picture elements (pixels). Pixel data corresponding to certain surface attributes of an image (e.g. color, depth, texture, etc.) are assigned to each pixel and the pixel data determines the nature of the projection on a display screen area associated with the logical pixel. Conventional three dimensional graphics processors typically involve extensive and numerous sequential stages or “pipeline” type processes that manipulate the pixel data in accordance with various vertex parameter values and instructions to map a three dimensional scene in the world coordinate system to a two dimensional projection (e.g., on a display screen) of an image. A relatively significant amount of processing and memory resources are usually required to implement the numerous stages of a traditional pipeline.
Rasterization is a process in which screen-space vertices of a graphics primitive are converted into pixels that cover the primitive. The process is usually very complicated and can attempt to deal with multiple pixels in a clock cycle. However, resources (e.g., processing capability, storage resources, etc.) of devices and systems that perform the rasterization are usually relatively limited. These limitations can make retrieving, coordinating and manipulating information associated with a final image rendered or presented on a display very difficult or even impossible. In addition, traditional graphics information processing can consume significant power and be a significant drain on limited power supplies, such as a battery.
Despite the complication of many traditional rasterization processes the end user typically expects precise and clear graphics. Traditionally, rasterization is implemented by techniques such as “edge walking”, where the location of pixels along a triangle edge are incrementally stepped from one vertex to another. Conventional approaches to “edge walking” often have limitations. For example, unless the pixel locations are computed from an absolute location, errors in the computation can accumulate resulting in a long edge having significant errors by the end of the edge. Traditionally attempts at overcoming error problems include using edge walkers which walk along the step axis of the edge where a step of a single pixel is guaranteed to traverse a distance of no more than a single pixel along the non-step axis. The axis used for scan line generation changes depending on which is the step axis of an edge defining a rasterization for an edge slope, resulting in walking vertically sometimes and horizontally sometimes.
Another technique for rasterization is to compute a bounding box for the triangle, and then rasterize tiles within that bounding box using a smart algorithm that examines which edges of the tile the triangle crosses to determine which direction to move for the next tile. Tiling techniques can encounter difficulties in that there are situations where such a heuristic cannot determine where the next tiles are that contain visible pixels. As a result, time is wasted on tiles that do not have coverage. Another problem is that it is difficult to produce an even rasterization pattern using such a heuristic. Instead, the tiles tend to have skips as rasterization jumps from one end of a line to another. Such skips commonly result in inefficient memory accesses for graphics operations such as depth test, texturing, etc.
Traditional walking techniques typically add significant hardware in order to prevent artifacts, particularly when dealing with fractions. Some portion of a floating point value associated with the fraction is often truncated. These truncated portions can accumulate as a line is a walked and gaps or cracks begin to appear at the boarders of rendered primitives.